# Maintainer: Sven-Hendrik Haase <svenstaro@archlinux.org>
pkgname=python-argparse-manpage
pkgver=4.5
pkgrel=1
pkgdesc='Automatically build man-pages for your Python project'
url='https://github.com/praiskup/argparse-manpage'
arch=('any')
license=('Apache')
makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel')
checkdepends=('python-pytest' 'python-pip')
source=("https://github.com/praiskup/argparse-manpage/releases/download/v${pkgver}/argparse-manpage-${pkgver}.tar.gz")
sha512sums=('24d2e574b74d33b6b39826cdca2083789fa5e10b4c844a4aa3cd2559db39417f0b55a52ec807dc82103a682f13c9cf83170286d305118edc0e2529100a8f2be1')

build() {
  cd "$srcdir/argparse-manpage-$pkgver"
  python -m build --wheel
}

check() {
  cd "$srcdir/argparse-manpage-$pkgver"
  python -m unittest discover -vs .
}

package() {
  cd "$srcdir/argparse-manpage-$pkgver"
  python -m installer --prefix=/usr --destdir="$pkgdir" dist/*.whl

  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

# vim:set ts=2 sw=2 et:
